/*
 * BacktrackerTester.cuh
 *
 *  Created on: Oct 22, 2013
 *      Author: jaime
 */

#ifndef BACKTRACKERTESTER_CUH_
#define BACKTRACKERTESTER_CUH_

#include "../../SATSolver/VariablesStateHandler.cuh"
#include "../../SATSolver/Backtracker.cuh"
#include "../../SATSolver/Configs.cuh"
#include "../../Utils/GPUVec.cuh"
#include "../../Utils/GPUStaticVec.cuh"
#include "../../SATSolver/DataToDevice.cuh"
#include "../Tester.cuh"

class BacktrackerTester : public Tester
{

private:
VariablesStateHandler handler;
Backtracker backtracker;

#ifdef ASSUMPTIONS_USE_DYNAMICALLY_ALLOCATED_VECTOR
	GPUVec<Lit> assumptions;
#else
	GPUStaticVec<Lit> assumptions;
#endif
	int number_of_variables;

	__device__ void reset();
	__device__ void add_decisions(bool randomly_branched);

	__device__ bool test_non_chronological_backtracking();
	__device__ bool test_chronological_backtracking();


public:
	__device__ BacktrackerTester(DataToDevice & data);
	__device__ void test_all();


};


#endif /* BACKTRACKERTESTER_CUH_ */
